package com.bwda.dsrs.filecenter.domain.form.sensitivewords;

import com.bwda.dsrs.filecenter.domain.BusinessConstants;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.*;

/**
 * 敏感字段新增参数Form
 *
 * @author zhangyinmei
 * @date 2019年4月29日
 */
@Data
@ApiModel(description = "敏感字段")
public class SensitiveWordsCreateForm {

    @ApiModelProperty(value = "敏感字段名称")
    @Size(min = 0, max = 64 ,message = "最长不超过64，请重新输入！")
    @NotNull(message = "敏感字段名称不能为空！")
    private String name;

    @ApiModelProperty(value = "敏感字段内容")
    @Size(min = 0, max = 255 ,message = "最长不超过255，请重新输入！")
    @NotNull(message = "敏感字段内容不能为空！")
    private String sensitiveContent;

    @ApiModelProperty(value = "0关键字1正则")
    @Min(value = BusinessConstants.SensitiveWordsMatchType.KEYWORD ,message = "0:关键字 1:正则 请正确输入！")
    @Max(value = BusinessConstants.SensitiveWordsMatchType.REGULAR ,message = "0:关键字 1:正则 请正确输入！")
    @NotNull(message = "匹配类型不能为空！")
    private Integer matchType;

    @ApiModelProperty(value = "备注")
    @Size(min = 0, max = 512 ,message = "最长不超过512，请重新输入！")
    private String remark;

}